﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RapChieuPhim.DTO;
using RapChieuPhim.DAO;
using System.Collections;
using System.Data;

namespace RapChieuPhim.BUS
{
    class PhongChieuBUS
    {
        public static PhongChieuDTO GetByID(int id)
        {
            PhongChieuDAO pcDAO = new PhongChieuDAO();
            return pcDAO.GetByID(id);
        }

        public static IList GetAllbyMaRap(int id)
        {
            PhongChieuDAO pcDAO = new PhongChieuDAO();
            return pcDAO.GetAllbyMaRap(id);
        }

        public static IList GetAll()
        {
            PhongChieuDAO pcDAO = new PhongChieuDAO();
            return pcDAO.GetAll();
        }


        public static int LayLastPhongChieu()
        {
            PhongChieuDAO pcDAO = new PhongChieuDAO();
            return pcDAO.LayLastPhongChieu();
        }


        public static void Insert(PhongChieuDTO PhongChieu, int _MaRap)
        {
            PhongChieuDAO pcDAO = new PhongChieuDAO();
            pcDAO.Insert(PhongChieu, _MaRap);
        }

        public static void Update(PhongChieuDTO PhongChieu, int _MaRap)
        {
            PhongChieuDAO pcDAO = new PhongChieuDAO();
            pcDAO.Update(PhongChieu, _MaRap);
        }

        public static void Delete(int id)
        {
            PhongChieuDAO pcDAO = new PhongChieuDAO();
            pcDAO.Delete(id);
        }
    }
}
